<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt"  prefix="fmt" %>

<!DOCTYPE html>
<html>
<head>
	<title>处理计划</title>

	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<!-- 引入bootstrap -->
	<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">
	<!-- 引入JQuery  bootstrap.js-->
	<script src="/js/jquery-3.2.1.min.js"></script>
	<script src="/js/bootstrap.min.js"></script>
	<script src="/js/jquery.easyui.min.js"></script>
	<%--<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">--%>

</head>
<body>
	<!-- 顶栏 -->
	<jsp:include page="top.jsp"></jsp:include>
	<!-- 中间主体 -->
	<div class="container" id="content">
		<div class="row">
			<jsp:include page="menu.jsp"></jsp:include>
			<div class="col-md-3" style="height:100vh;">
				<div class="panel panel-default">
				    <div class="panel-heading">
                      <div class="row">
						  <ul id="button1"><a ><input type="button" value="地点管理"></a></ul>
						  <ul id="messageInfoAddTree"  class="easyui-tree" data-options="lines:true" style="height:94%">
						  </ul>
				  </div>
				    </div>
				</div>
			</div>
			<div id="content2">

			</div>
			<div id="content3">

			</div>
			<div id="content4">

			</div>
		</div>
	</div>
	<div class="container" id="footer">

	</div>
</body>


	<script type="text/javascript">
		$('#messageInfoAddTree').tree({


            method:"get",
			url: "/plan/list",
			loadFilter: function(data){
						return data.data;

					},
					onLoadSuccess: function(){
						var txt1="<a href='javascript:'></a>";
						$(".tree-node").wrap(txt1)
					},
					onClick: function(node,data){
						var txt2="<div id='nodecontent'>"+node.content+"</div>";
						var txt3=" <h1 id='title1' class='text-center'>"+node.text+" </h1>";
						$("#content2").empty()
						$("#content3").empty()
						$("#nodecontent").empty()
						$("#content2").prepend(txt3)
						$("#content3").load("/plan/accidentType/"+node.id)
						$("#content4").after(txt2)
					}

		}
		);



		$("#nav li:nth-child(2)").addClass("active");

        function confirmd() {
            var msg = "您真的确定要删除吗？！";
            if (confirm(msg)==true){
                return true;
            }else{
                return false;
            }
        };

        $("#sub").click(function () {
            $("#form1").submit();
        });
		$("#button1").click(function(){
			window.open ("/plan/editPlace");
		})

        <c:if test="${pagingVO != null}">
			if (${pagingVO.curentPageNo} == ${pagingVO.totalCount}) {
				$(".pagination li:last-child").addClass("disabled")
			};

			if (${pagingVO.curentPageNo} == ${1}) {
				$(".pagination li:nth-child(1)").addClass("disabled")
			};
        </c:if>
	</script>
</html>